package club.banyuan.reserve.dao;

import club.banyuan.reserve.model.Permission;
import club.banyuan.reserve.model.Role;
import club.banyuan.reserve.model.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author HanChao
 * 描述信息：
 */
public interface AuthDao {

    // 根据用户名查用户
    User findUserIdByUserName (@Param(value = "username") String username);

    // 根据用户ID查角色
    List<Role> findRoleByUserId (@Param(value = "userId") Integer userId);

    // 根据角色ID查权限
    List<Permission> findPermissionByRoleId (@Param(value = "roleIds") List<Integer> roleId);
}
